Welcome to ‘Project,
Application, Build, and Jobs’. After watching this video, you will be able to Explain what a project is
in IBM Cloud Code Engine, explain what an application
is in IBM Cloud Code Engine, explain what a build is in IBM Cloud Code Engine, and explain what a job is
in IBM Cloud Code Engine. The term project in Code Engine represents a group that contains and manages
its resources and entities. A grouping in Code Engine
contains entities such as build, app, job, and certificate for Transport Layer Service
(or TLS) HTTPs connections, and so on. One important function of a project is
providing a namespace for its entities. A namespace provides a mechanism for isolating groups of entities and
resources within a single group. Names of entities need to be unique within
a namespace, but not across namespaces. Another important function is managing
resources and providing access control. Here you can see a sample screenshot of what
a project looks like in IBM Cloud Code Engine. The project is called my-project and it groups
and provides a namespace for all its entities. You can easily find the summary of all entities; for example, here you can see that
it has 11 applications and 2 jobs. The project also provides access
control and auditing of resources so that you can see which resources were updated. In addition, you can monitor
the resource allocation for the whole project, such as Total CPU or memory usage. In Code Engine, your code
will run the application. Like regular deployed web applications, your running application can serve
HTTP requests or provide REST APIs. And in addition to traditional HTTP requests, Code Engine also supports
applications that use WebSockets. Now a WebSocket is a communication protocol based
on Transmission Control Protocol (or TCP). It is mostly used for long-running
and session-based communication between clients and servers,
such as a chat application. Code Engine scales your application by creating or destroying
application running instances. The number of running instances of
an app is automatically scaled up or down (to zero) based on incoming
workloads and your configuration settings. Here you see a sample UI of a Code Engine project. The name of the application is ‘my-application’,
and it is under a project called ‘my-project’. You can also see a green check
icon that indicates that this application has been successfully
deployed and is ready to serve. You can click the Application URL link
to open your web application’s URL. In the Configuration section, you can
configure the source of your application, which can either be from a registered container
image or directly from the source code. In the Code Engine context,
a build, or image build, is a mechanism you can use to create a
container image from your source code. A container image includes every
asset that a container needs to run, such as executable source
code, dependencies, resources, container engines, system libraries,
configuration settings, and so on. The Code Engine supports
building from a Dockerfile, which is a text file that includes all the
commands to build a docker container image. Alternatively, it can use
a Cloud Native Buildpack. And a buildpack is another popular
way to build the container image. It contains executables to perform
tasks such as inspecting source code, creating a build plan, or executing
the build plan to produce an image. After your container image is
built from the source code, you can deploy your built container image to the
Code Engine and create an application accordingly. Now a job is a one-time execution of your code. Like an application, a job runs
executable code, and depending on the workload, the Code Engine will create one or more instances of a job. Unlike applications, which primarily
handle HTTP requests or WebSocket sessions, jobs are designed to run one time and exit. So before you run a job in the Code Engine, you can specify workload configurations
that are used each time the job runs. Some typical jobs are: Data processing jobs to query
and transform data in batches, machine learning model training jobs, reporting jobs to generate reports
based on a preset schedule, and billing jobs to create and send bills. In this video, you learned that: A project is a grouping of Code Engine entities
such as applications, jobs, and builds, an application runs your code to serve HTTP
requests or to create WebSocket sessions, a build is a process to create a
container image from your source code, and a job runs one or more
instances of your executable code.